from PyQt4 import QtCore, QtGui


class test(QtGui.QWidget):
    def __init__(self):
        QtGui.QWidget.__init__(self) 
               
        cb = QtGui.QComboBox( self)
        for x in 'abcdefg' : 
            cb.addItems( x )
        
        self.show()
        
        print len(cb)
                
if __name__ == '__main__':
    import sys    
    app = QtGui.QApplication(sys.argv)
    ui = test()    
    app.exec_() 